<template>
    <div class="loading-bg"></div>
</template>

<script>
    import {Toast} from 'mint-ui'
    export default {
        created(){
             this.instance = Toast({
                message: 'loading...',
                iconClass: 'fa fa-spinner fa-pulse fa-3x fa-fw',
                duration : -1
            });
        },
        mounted(){

        },
        data(){
            return {
                instance : undefined
            }
        },
        beforeDestroy(){
//            console.log('beforeDestroy',this.instance)
            this.instance.close()
        }
    }
</script>

<style scoped lang="less">
    .loading-bg {
        background: rgba(0, 0, 0, .3);
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        /*width:100vw;*/
        /*height:100vh;*/
        z-index:999
    }
</style>
